﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.RemoteCtrls.Custom;
using System;
using System.Activities.Presentation;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace DWF.Studio.RemoteCtrls.Proxy
{
    public class DragDropProxy : MarshalByRefProxyBase
    {
        private static Control _control = new Control();

        public void DragDropScript(string scriptName)
        {
            DragDropScriptTemplate.ScriptName = scriptName;
            IDataObject dataObject = new DataObject();
            dataObject.SetData(DragDropHelper.WorkflowItemTypeNameFormat, typeof(DragDropScriptTemplate).AssemblyQualifiedName);
            DragDrop.DoDragDrop(_control, dataObject, DragDropEffects.Copy | DragDropEffects.Link);
        }
    }
}
